import request from '@/utils/request'

// 查询品牌列表
export function listBrand(query) {
  return request({
    url: '/admin/brand/list',
    method: 'get',
    params: query
  })
}
// 查询品牌列表-不分页
export function searchBrand(query) {
  return request({
    url: '/admin/brand/search',
    method: 'get',
    params: query
  })
}

// 查询品牌详细
export function getBrand(configId) {
  return request({
    url: '/admin/brand/' + configId,
    method: 'get'
  })
}

// 新增品牌
export function addBrand(data) {
  return request({
    url: '/admin/brand/save',
    method: 'post',
    data: data
  })
}

// 修改品牌
export function editBrand(data) {
  return request({
    url: '/admin/brand/update',
    method: 'put',
    data: data
  })
}

// 删除品牌
export function delBrand(configId) {
  return request({
    url: '/admin/brand/remove/' + configId,
    method: 'delete'
  })
}
